Make application command
A Make command is a request to create a new object. The command can include values for properties of the object, for the data of the object, or both.SYNTAX
make [new] className at referenceToLocation ¬ [ with properties ¬ { propertyLabel:propertyValue [, propertyLabel:propertyValue ]...}]¬ [ with data dataValue ]PARAMETERS
- className
- The class of the object to be created.
Class: Class identifier- referenceToLocation
- The location at which to create the new object.
Class: Reference- propertyLabel
- The name of a property whose value is to be set.
Class: String- propertyValue
- The value to assign to the property.
Class: The value class of the property, as specified in the application dictionary definition of the object class being created, or a value that can be coerced into the class of
the property
Default value: The default value of the property, as specified
in the application dictionary definition of the object class
being created- dataValue
- The value to assign to the object.
Class: The default value class of the object, or a value that can
be coerced into the default value class. Default value classes
of objects are listed in the "Default Value Class Returned" sections of the dictionary definitions of the objects.
Default value: NoneRESULT
A reference to the newly created object.Class: Reference
EXAMPLE
tell application "Scriptable Text Editor" make window at beginning with properties ÿ {bounds:{400, 300, 500, 600}, contents:"This window is narrow."} end tellNOTES
If you use the Make command to create a new text object, check the application dictionary to determine how the application handles delimiters. Some applications, such as the Scriptable Text Editor, supply delimiters automatically, so you don't have to include them in the value of thewith data
parameter.